package com.wang.mall.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "product_image")
public class ProductImage implements Serializable {
    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 图片地址
     */
    @TableField(value = "image_url")
    private String imageUrl;

    /**
     * 外键关联商品表ID
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 图片类型 1 小图片 2 大图片
     */
    @TableField(value = "type")
    private String type;

    /**
     * 图片名称
     */
    @TableField(value = "name")
    private String name;

    private static final long serialVersionUID = 1L;
}